$(document).ready(function() {

});
function ExecActionMante(type) {
	hdcodigo = $('#hdcodigo').val();
	txtds_almacen = $('#txtds_almacen').val();
	txtds_direc = $('#txtds_direc').val();
	txtds_obs = $('#txtds_obs').val();
	st_stado = '1';
	
	
	var arrtable = $("#frmdetalleAL").serialize();
		// alert(arr);
		//arrtable = arrtable.replace(/&/g, "\",\"");
		//arrtable = '["' + arrtable.replace(/=/g,"\":\"") + '"]';
		//arrtable =decodeURI(arrtable);
	
	$.ajax({
		dataType : "html",
		type : "POST",
		url : jQuery.scriptPath + 'index.php/Almacen/executemante/',
		data : "type=" + type 
				+ "&hdcodigo=" + hdcodigo
				+ "&txtds_almacen=" + txtds_almacen  
				+ "&txtds_direc=" + txtds_direc 
				+ "&txtds_obs=" + txtds_obs 
				+ '&st_stado=' + st_stado+"&"+ arrtable,
		beforeSend : function(data) {

		},
		success : function(requestData) {
			//alert(requestData);
			$("#result").html(requestData);
		},
		error : function(requestData, strError, strTipoError) {
			$("#result").html("Error " + strTipoError + ": " + strError);
			//alert("Error " + strTipoError +": " + strError);
		}
	});
}